{#

This file is part of the Sonata package.

(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.

#}

{% extends base_template %}

{% block title %}
    {% if admin.id(object) %}
        eghjhgdfghjk{{ "title_edit"|trans({'%name%': admin.toString(object) }, 'SonataAdminBundle') }}
    {% else %}
        fghjklmù{{ "title_create"|trans({}, 'SonataAdminBundle') }}
    {% endif %}
{% endblock%}

{% block actions %}
    <div class="sonata-actions btn-group">
        
        {% if admin.hasroute('show') and admin.id(object) and admin.isGranted('VIEW', object) and admin.show|length > 0 %}
            <a class="btn sonata-action-element" href="{{ admin.generateObjectUrl('show', object) }}">
                <i class="icon-zoom-in"></i>
                {{ 'link_action_show'|trans({}, 'SonataAdminBundle') }}</a>
        {% endif %}
        {% if admin.hasroute('history') and admin.id(object) and admin.isGranted('EDIT', object) %}
            <a class="btn sonata-action-element" href="{{ admin.generateObjectUrl('history', object) }}">
                <i class="icon-book"></i>
                {{ 'link_action_history'|trans({}, 'SonataAdminBundle') }}</a>
        {% endif %}
        {% include 'SonataAdminBundle:Core:create_button.html.twig' %}
        {% if admin.hasroute('list') and admin.isGranted('LIST')%}
            <a class="btn sonata-action-element" href="{{ admin.generateUrl('list') }}">
                <i class="icon-list"></i>
                {{ 'link_action_list'|trans({}, 'SonataAdminBundle') }}</a>
        {% endif %}
    </div>
{% endblock %}

{% block side_menu %}{{ knp_menu_render(admin.sidemenu(action), {'currentClass' : 'active'}, 'list') }}{% endblock %}

{% use 'SifastProjectBundle:CRUD:base_edit_form.html.twig' with form as parentForm %}

{% block form %}
    {{ block('parentForm') }}
{% endblock %}
